Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
How can I trim a string if input is Ramesh-123-india ...my desire output should be only "india""

In material table one of the column has to be trim ..for example input is ramesh-123-india ,the output should be come as only "india"....how to do this

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Consider looking into the split(). JavaScript docs

You can pass in a string pattern that it searches for to split it up.

about 4 years ago · Juan Pablo Isaza Report

0

1) You can make use of split here

const str = "ramesh-123-india";
const result = str.split("-")[2];

console.log(result);

2) You can also use regex /\w+$/ here as:

enter image description here

const str = "ramesh-123-india";
const result = str.match(/\w+$/)[0];

console.log(result);

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!